package net.orange.framework.logic;

import java.util.Collection;

import net.orange.architecture.process.IBaseProcess;
import net.orange.framework.model.Department;
import net.orange.framework.model.Group;

/**
 * The interface of user business delegate process object, to retrieve , save ,
 * remove or process other operation for the user object.
 */
public interface IUserProcess extends IBaseProcess {

	/**
	 * Validate the user's login no and password.
	 * 
	 * @param login_no
	 * @param login_pwd
	 * @return Whether the login no and password is right
	 * @throws Exception
	 */
	public boolean validate(String login_no, String login_pwd) throws Exception;

	/**
	 * Find the users under the target department
	 * 
	 * @param department
	 *            The target department.
	 * @return The users under the target department
	 * @throws Exception
	 */
	public Collection find(Department department) throws Exception;

	/**
	 * Find the users under the target group
	 * 
	 * @param group
	 *            The target group.
	 * @return The users under the target department
	 * @throws Exception
	 */
	public Collection find(Group group) throws Exception;

}